Persisting High Availability Protection State for Virtual Machines Stored on Distributed Object-Based Storage

ABSTRACT

Techniques are disclosed for persisting high availability (HA) protection state for virtual machines (VMs) running on host systems of a host cluster, where the host cluster aggregates locally-attached storage resources of the host systems to provide an object store, and where persistent data for the VMs is stored as per-VM storage objects across the locally-attached storage resources comprising the object store. In one embodiment, a host system in the host cluster executing a HA module determines an identity of a VM that has been powered-on in the host cluster. The host system then persists HA protection state for the VM in a storage object of the VM, where the HA protection state indicates that the VM should be restarted on an active host system in the case of a failure in the host cluster.

BACKGROUND

Virtual machine high availability (referred to herein simply as “highavailability,” or HA) and hypervisor-converged object-based (HC/OB)storage are two emerging technologies in the field of computervirtualization. HA is designed to minimize virtual machine (VM) downtimeby monitoring the availability of host systems and VMs in a hostcluster. If an outage, such as a host or network failure, causes one ormore VMs to stop executing, HA detects the outage and automaticallyrestarts the affected VMs on active host systems in the cluster. In thisway, HA ensures that guest applications running within the VMs continueto remain operational throughout the outage. One exemplary HAimplementation is described in commonly-assigned U.S. Patent ApplicationPublication No. 2012/0278801, published Nov. 1, 2012, entitled“Maintaining High Availability of a Group of Virtual Machines UsingHeartbeat Messages.”

HC/OB storage is a distributed, software-based storage technology thatleverages the local or direct attached storage resources (e.g., solidstate disks, spinning hard disks, etc.) of host systems in a hostcluster by aggregating these locally-attached resources into a single,logical storage pool. Thus, this technology effectively re-purposes thehost cluster to also act as a distributed storage cluster. Ahypervisor-based storage system layer (referred to herein generically asa “VSAN layer” comprising “VSAN modules”) manages the logical storagepool and enables interactions between the logical storage pool andstorage clients, such as VMs running on host systems in the cluster. Forexample, the VSAN layer allows the VMs to access the logical storagepool during VM runtime in order to store and retrieve persistent VM data(e.g., virtual disk data).

The qualifier “object-based” in “hypervisor-converged object-basedstorage” refers to the manner in which VMs are maintained within HC/OBstorage—in particular, the state of each VM is organized as ahierarchical collection of distinct storage objects (or simply“objects”). For example, the files that hold the metadata/configurationof a VM may reside in a file system that is created within a namespaceobject (also known as a “file system object”), the virtual disks of theVM may reside in virtual disk objects, and so on. Each of these storageobjects may be composed of multiple component objects. The VSAN layerprovisions, manages, and monitors each of these storage objectsindividually. For instance, in order to meet a particular storage policyfor a particular virtual disk VMDK1, the VSAN layer may determine thatthe component storage objects that make up the virtual disk objectcorresponding to VMDK1 should be striped across the locally-attachedstorage of three different host systems. Through these and othermechanisms, HC/OB storage can provide improved ease of management,scalability, and resource utilization over traditional storagesolutions. One exemplary implementation of an HC/OB storage system isdescribed in commonly-assigned U.S. patent application Ser. No.14/010,293, filed Aug. 26, 2013, entitled “Scalable Distributed StorageArchitecture.”

Unlike non-object-based storage systems, the state of a VM is notcontained within a larger, coarse storage container (e.g., a LUN).Having such storage containers provide a couple of benefits. First, acoarse storage container provides a convenient location to storeinformation common to all VMs that use the container. For example, it ispossible to create a file system on top of a LUN, create a directorywithin the file system for each VM whose state is stored on theunderlying storage device(s), and then create a directory at the root tostore shared information. Second, for a given class of failures, one canreason about the availability/accessibility of all of the VM data storedwithin a storage container by reasoning about theavailability/accessibility of the container itself. For instance, onecan determine whether a network failure impacts the accessibility of theVM data by determining if the container is accessible. As a result,there is no need to track the accessibility of each individual VM storedin a single storage container—instead, it is sufficient to track theaccessibility of the container itself.

The lack of coarse storage containers raises unique challenges whenattempting to use HC/OB storage and HA concurrently in the samevirtualized compute environment. As one example, existing HAimplementations typically maintain information known as “HA protectionstate” that identifies the VMs in a host cluster that should befailed-over/restarted in the event of a failure. The “master” HA modulein the cluster (i.e., the HA module that is responsible for detectingfailures and orchestrating VM failovers/restarts) manages this HAprotection state by persisting it to a centralized file (or set offiles) on the storage tier. If there is an outage that affects a subsetof host systems in the cluster, one or more new master HA modules may beelected. Each newly elected master HA module may then retrieve the filefrom the storage tier to determine which VMs are HA protected. Thisapproach works well if the storage tier is implemented using dedicatedshared storage, since the HA protection file can be placed in thestorage container storing the configurations for the protected VMs. Onthe other hand, if the storage tier is implemented using HC/OB storage,there is no convenient location to store such information that is sharedacross VMs.

As another example, in existing HA implementations, when a master HAmodule detects a failure that requires one or more VMs to befailed-over/restarted, the master HA module executes a conventionalfailover workflow that involves (1) identifying active host systems forplacing the VMs that can meet the VMs' resource needs, and (2)initiating VM restarts on the identified host systems. If the VMs arestored on dedicated shared storage, these two steps are generallysufficient for successfully completing the failover. However, if the VMsare stored on HC/OB storage, there may be cases where a VM cannot berestarted because one or more of its storage objects are not yetaccessible to the host system executing on the master HA module (and/orto the host system on which the restart is being attempted). Thissituation cannot be uncovered using conventional coarse-grained storageaccessibility checks. This, in turn, can cause the conventional failoverworkflow to break down, or result in multiple continuous restartattempts, which can increase the load on the affected host systems.

As yet another example, there are certain types of network partitionsthat can further complicate the HA protection state persistence and VMfailover/restart workflows noted above. As one example, if there is afailure that causes the VSAN modules to observe a partition while the HAmodules do not, there may be instances where the host system on whichthe master HA module is running does not have access/visibility to aparticular VM (and thus cannot update/retrieve HA protection stateinformation for the VM, or determine its accessibility for failoverpurposes), while the host systems of other, slave HA modules do havesuch access/visibility.

Accordingly, it would be desirable to have techniques for integrating HAwith distributed object-based storage systems like HC/OB storage thatovercome these, and other similar, issues.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a virtualized compute environment that implements bothHC/OB storage and HA according to an embodiment.

FIG. 2 depicts a hierarchical object structure for a VM stored on HC/OBstorage according to an embodiment.

FIG. 3 depicts functional components of a HA module according to anembodiment.

FIG. 4 depicts a flow diagram for persisting HA protection state for aVM in a centralized file.

FIG. 5 depicts a flow diagram for persisting HA protection state for aVM in a namespace object of a VM according to an embodiment.

FIG. 6 depicts a flow diagram for retrieving HA protection stateaccording to an embodiment.

FIGS. 7, 8, and 9 depict flow diagrams for executing a HAfailover/restart workflow according to an embodiment.

FIG. 10 depicts a partition scenario in which the VSAN modules of a hostcluster observe a network partition but the HA modules of the hostcluster do not according to an embodiment.

FIG. 11 depicts a flow diagram for persisting HA protection state in thescenario of FIG. 10 according to an embodiment.

FIG. 12 depicts a flow diagram for determining host placement during afailover workflow in the scenario of FIG. 10 according to an embodiment.

FIG. 13 depicts a flow diagram for propagating VM accessibility changesto a master HA module in the scenario of FIG. 10 according to anembodiment.

FIG. 14 depicts a partition scenario in which the VSAN and HA modules ofa host cluster observe different network partitions according to anembodiment.

DETAILED DESCRIPTION

The present disclosure describes techniques that allow high availability(HA) to be provided for VMs that are stored on distributed object-basedstorage. In one set of embodiments, the techniques can includepersisting, by a master HA module, HA protection state for VMs in a hostcluster on a per-VM basis (rather than in a centralized file) in thelogical storage pool of the distributed object-based storage system. Forexample, in a particular embodiment, the master HA module can persist HAprotection state for a given VM as metadata for the VM's namespaceobject. With this approach, the master HA module can avoid scenarioswhere it can access the VM itself, but cannot access the VM's protectionstate (or vice versa). This approach also provides performance benefitswhen a newly elected master HA module needs to retrieve the persistedprotection state information.

In another set of embodiments, the techniques can include modifying theconventional failover/restart workflow performed by the master HA moduleto account for potential VM inaccessibility at the time of failover.With these modifications, the master HA module can more gracefully dealwith situations where a VM has been identified as a failover candidate,but some critical subset of the VM's storage objects remainsunavailable.

In yet another set of embodiments, the techniques can includeenhancements to both the HA protection state persistence andrestart/failover workflows mentioned above so that they can operate moreeffectively in specific network partition scenarios.

In the sections that follow, numerous examples and details are set forthin order to provide a thorough understanding of various embodiments. Itshould be appreciated, however, that certain embodiments can bepracticed without some of these details, or can be practiced withmodifications or equivalents thereof For instance, although examples areprovided for integrating HA with HC/OB storage in particular, thetechniques of the present disclosure may also be used to integrate HAfunctionality with other types of storage systems that exhibitcharacteristics similar to HC/OB systems (e.g., distributed object-basedstorage systems that expose multiple, distinct ingress/access points tostorage clients). Further, although certain embodiments are discussed inthe context of a HA system that relies on a master/slave modelcomprising at least one master HA module and multiple slave HA modules,the present techniques are applicable to any distributed, highavailability system designed to monitor the liveliness of VMs andfailover such VMs in the case of failures, regardless of the manner inwhich the HA modules interoperate (e.g., master/slave, peer-to-peer,etc.). For example, in a peer-to-peer HA implementation, the functionsattributed to the master HA module in the sections below may beperformed by one or more peer HA modules. One of ordinary skill in theart will recognize many variations, modifications, and alternatives.

For purposes of this disclosure, a VM is said to be “stored on”distributed object-based (e.g., HC/OB) storage if the VM's configuration(e.g., vmx file) is maintained within the storage system's logicalstorage pool (sometimes referred to herein as the “object store”). Otherstate information for the VM (e.g., virtual disk data) may also bemaintained within the HC/OB storage pool, or may be stored ontraditional shared storage.

Further, a VM is said to be “accessible” by/to a host system (or amodule thereof, such as a HA module running on the host system) if allof its storage objects can be accessed by the host system. The VM is“inaccessible” if these requirements are not met. Alternatively, in someembodiments, a VM may be considered “accessible” if some user-definedsubset of “required” storage objects can be accessed by the host system.One exemplary object structure for a VM (which can include, e.g., anamespace object, one or more virtual disk objects, and so on) isdescribed in Section 1.1 below.

1. Virtualized Compute Environment

To provide context for the techniques described herein, FIG. 1 depicts avirtualized compute environment 100 that implements both HC/OB storageand HA according to an embodiment. As shown, environment 100 includes ahost cluster 102 comprising host systems 104(1)-104(M), a virtualizationmanagement platform 106, and a conceptual HC/OB storage component 108.

Host cluster 102 and constituent host systems 104(1)-104(M) providevirtualized compute resources within environment 100. For example, eachhost system 104(1)-104(M) includes a virtualization layer, or“hypervisor,” 110(1)-110(M) through which the host system can executeone or more VMs 112(1)-112(M). As part of its responsibilities, eachhypervisor can manage the physical hardware 114(1)-114(M) of itsrespective host system (e.g., CPU, memory, etc.) to make these hardwareresources available, in appropriate amounts, to running VMs.

Virtualization management platform 106 is an entity that allows users toperform administrative and management tasks with respect to host cluster102, such as configuring and managing the lifecycles of VMs112(1)-112(M) running on host systems 104(1)-104(M). Virtualizationmanagement platform 106 can also interact with host systems104(1)-104(M) to enable/facilitate certain inter-host features, such asVM migrations, distributed resource scheduling, and so on.

HC/OB storage 108 is a conceptual representation of a distributed,software-based storage tier that provides storage services to hostcluster 102. For instance, HC/OB storage 108 can be used to store thepersistent state of VMs 112(1)-112(M) running on host systems104(1)-104(M). As shown in FIG. 1, HC/OB storage 108 comprises a logicalstorage pool (i.e., object store 116) that is an aggregation of localstorage resources 118(1)-118(M) that are locally-attached (i.e., housedin or attached via a point-to-point link) to host systems 104(1)-104(M).These local storage resources may include, e.g., commodity SSDs,commodity spinning hard disks, and other types of non-volatile memory.Since object store 116 of HC/OB storage 108 is composed entirely ofaggregated host-side storage, there is no physical distinction betweenthe storage tier of environment 100 represented by HC/OB storage 108 andthe compute tier of environment 100 represented by host cluster 102.They are, from a physical perspective, one and the same.

Per its designation as an “object-based” storage component, HC/OBstorage 108 stores data, such as VM state, in the form of distinctstorage objects. As noted in the Background section, these storageobjects can be provisioned, managed, and monitored on an individualbasis. Thus, unlike non-object-based storage systems that typicallygroup together the states for multiple VMs into a coarse storagecontainer (e.g., a LUN or file system container), HC/OB storage 108 canprovide granular performance isolation, per-VM or per-virtual diskquality of service, and other features that are beneficial invirtualized compute environments like environment 100.

1.1 VSAN Modules

To manage and provide access to HC/OB storage 108, hypervisors110(1)-110(M) of host systems 104(1)-104(M) include a software-basedstorage management (i.e., “VSAN”) layer comprising VSAN modules120(1)-120(M). As shown, VSAN modules 120(1)-120(M) are interconnectedvia a management network 124. Although a comprehensive discussion of theoperation of VSAN modules 120(1)-120(M) is beyond the scope of thisdisclosure, VSAN modules 120(1)-120(M) are responsible for, among otherthings, enabling interactions between the storage tier represented byHC/OB storage 108 and storage clients or other external entities. Forexample, in one set of embodiments, VSAN modules 120(1)-120(M) canautomate the creation of storage objects in object store 116 for new VMsand/or virtual disks that are provisioned by, e.g., administrators viavirtualized management platform 106. In another set of embodiments, VSANmodules 120(1)-120(M) can process VM I/O requests that are directed to,e.g., virtual disks, swap space, etc. on object store 116, such thatthose I/O requests are properly routed to the host systems in cluster102 that house the local storage resources backing the storage objectsassociated with the requested virtual disk data. In yet another set ofembodiments, VSAN modules 120(1)-120(M) can expose APIs that allow otherentities/modules to, e.g., modify storage object metadata, queryinformation regarding the status or accessibility of certain storageobjects (or groups of objects), and more.

To clarify how VSAN modules 120(1)-120(M) may create a storage objectrepresentation of a newly provisioned VM in object store 116, FIG. 2depicts an example object structure 200 for a “VM 1” running on hostsystem 104(1) according to an embodiment. As shown, object structure 200includes a top-level “namespace” object 202 that is one of multiplenamespace objects in object store 116. Namespace object 202 correspondsto a representation of a file system (such as VMFS, NFS, etc.) that isused to store the files of VM 1 that represent part of the VM's state.In the specific embodiment of FIG. 2, namespace object 202 includes aconfiguration file for VM 1 (identified by the path “/vsan/fs1/vm1.vmx”)and a virtual disk descriptor file for a virtual disk 204 used by VM 1(identified by the path “/vsan/fs1/disk1.vmdk”).

The virtual disk descriptor file within namespace object 202 includes,in turn, a pointer to a composite virtual disk object 206 (distinct fromnamespace object 202) that conceptually represents virtual disk 204.Object 206 includes metadata that describes a storage organization orconfiguration for virtual disk 204, referred to as an “object blueprint”208. In one embodiment, VSAN modules 120(1)-120(M) may create thisobject blueprint at the time virtual disk 204 is provisioned based onone or more storage profiles for the virtual disk that are specified by,e.g., an administrator. Object 206 also includes references to a numberof component objects 210(1)-210(6). Component objects 210(1)-210(6) holdthe actual data for virtual disk 204 in accordance with the storageconfiguration identified in object blueprint 208. For example, in FIG.2, component objects 210(1)-210(6) correspond to data stripes in a RAID1/RAID 0 configuration per object blueprint 208.

Finally, as shown via the lines interconnecting component objects210(1)-210(6) with host systems 104(2), 104(3), and 104(4), thesecomponent objects map to specific storage locations on the local storageresources of host systems 104(2)-104(4) respectively that back the datastripes represented by the objects. Like object blueprint 208, VSANmodules 120(1)-120(M) may determine these mappings in a way thatsatisfies one more storage profiles defined for virtual disk 204.

It should be appreciated that object structure 200 of FIG. 2 isillustrative and not intended to limit the embodiments described herein.Generally speaking, object structure 200 may include objectscorresponding to any type of storage entity that VM 1 may consume/use,such as swap objects, memory checkpoint objects, file shares which arethemselves contained within objects, and so on. One of ordinary skill inthe art will recognize many variations, modifications, and alternatives.

As part of the process of creating object structure 200 within objectstore 116 (and at potentially other times), VSAN modules 120(1)-120(M)can cache, in an in-memory database 212 that is synchronized andreplicated on every host system, detailed information regarding objectstructure 200, such as what composite and component objects are includedin the structure, the relationships between objects, metadata associatedwith each object, and the mapping of objects to physical storagelocations. In this way, each VSAN module 120(1)-120(M) can have thisinformation readily available (for, e.g., recovery or I/O requestprocessing purposes) without needing to access object store 116. VSANmodules 120(1)-120(M) may also use in-memory database 212 to cache othertypes of information that are relevant to their management of HC/OBstorage 108, such a physical inventory of the local storage resources inhost cluster 102, the performance characteristics of each local storageresource, quality of service requirements, cluster topology/health, andmore.

1.2 HA Modules

In addition to VSAN modules 120(1)-120(M), each hypervisor 110(1)-110(M)of host cluster 102 includes a HA module 122(1)-122(M). In theembodiment of FIG. 1, HA modules 122(1)-122(M) are communicativelycoupled via a management network 126 that is separate from managementnetwork 124 interconnecting VSAN modules 120(1)-120(M). However, inalternative embodiments, HA modules 122(1)-122(M) and VSAN modules120(1)-120(M) may share the same management network.

Collectively, HA modules 122(1)-122(M) allow for high availability ofVMs 112(1)-112(M) running within host cluster 102. For example,according to a typical HA implementation, when HA is first turned on(via, e.g., virtualization management platform 106), HA modules122(1)-122(M) can communicate with each other to elect a master HAmodule. The master HA module is generally responsible for, e.g.,monitoring the health of hosts and VMs in the cluster, orchestrating VMfailovers/restarts in case of a failure, reporting cluster state andfailover actions to virtualization management platform 106, and managingHA protection state. This last function involves managing informationregarding which VMs in host cluster 102 should be protected for HApurposes. In existing HA implementations, the master HA module typicallypersists this HA protection state information to a centralized file onthe storage tier (discussed in greater detail in Section 2 below).

The remaining, non-master modules can configure themselves to act asslave HA modules. Each slave HA module is generally responsible for,e.g., monitoring and forwarding local host/VM state changes to themaster HA module, locally restarting VMs on its host system whendirected by the master HA module, and participating in master election.

When the master HA module detects a host/VM/network outage (by, e.g.,determining that it is no longer in communication with one or more slaveHA modules), the master HA module can execute a failover/restartworkflow for automatically restarting the VMs that are renderedinoperable by the failure. At a high level, this workflow can includeidentifying the VMs to be restarted, placing those VMs on active hostsystems in cluster 102 that have available capacity, and thentransmitting commands to the slave HA modules on the respective hostsystems to initiate the restart process for each VM. In this manner, themaster HA module (together with the slave HA modules) can ensure thatthe guest applications running within the affected VMs remainoperational throughout the outage.

In addition, whenever one or more of HA modules 122(1)-122(M) are nolonger in contact with a master HA module, those modules can perform are-election to elect a new master. This may occur if, e.g., a failure inmanagement network 126 causes some subset of HA modules 122(1)-122(M) tobecome partitioned from another subset including the current master HAmodule, or if the host system running the master HA module fails orbecomes network isolated. In these situations, the cluster may comprisemultiple master HA modules (one master per partition). This will remainthe case until the failure(s) causing the network partition(s) areresolved, at which point all but one master HA module will abdicate.

For purposes of illustration, FIG. 3 depicts an exemplary HA module 122comprising various functional components 300-310 according to anembodiment. These functional components generally map to the host/VMmonitoring, failover orchestration, HA protection state management,local restart, and master election functions attributed to HA modules122(1)-122(M) in the description above. Depending on the HAimplementation, HA module 122 can also include other components orsub-components that are not specifically shown. or exclude one or moreof the existing components. For instance, some HA implementations maynot use a master/slave model, and instead implement group messagingamong HA modules in “virtual synchrony.” In these and similarembodiments, there would be no need for, e.g., master election component310. One of ordinary skill in the art will recognize many variations,modifications, and alternatives.

2. Managing HA Protection State

As mentioned previously, in existing HA implementations, the master HAmodule of a host cluster generally saves HA protection state for the VMsrunning within the cluster to one or more centralized files onpersistent storage. This arises out of the need for newly elected masterHA modules to determine, at the time they are elected, which VMs shouldbe protected for HA purposes. Without persisting this information insome way, the newly elected masters have no way of knowing which VMsthey should monitor and failover/restart in the case of a failure (sincethe original master HA module that previously maintained thisinformation may have failed or become network isolated or partitioned).

By way of example, FIG. 4 depicts an exemplary flowchart 400 that may beperformed by a master HA module for persisting HA protection state to acentralized file according to an existing HA implementation. Inparticular, FIG. 4 illustrates HA protection state processing thatoccurs when a VM is first powered in the master HA module's hostcluster.

At block 402, a user issues a power-on command for a given VM. At block404, the host system on which the VM is registered performs a power-onoperation and reports the powered-on status of the VM to thevirtualization management platform for the cluster. In response, thevirtualization management platform informs the master HA module that theVM should be HA protected (block 406).

At block 408, the protection state management component of the master HAmodule stores the HA protection state for the VM in memory (so that itcan be quickly retrieved by the master HA module on-demand). Finally, atblock 410, the protection state management component writes the HAprotection state for the VM to a centralized protection file on thestorage tier of the cluster (so that it can be retrieved by other, newlyelected master HA modules in the case that the current master goes downor becomes unavailable).

While the approach for persisting HA protection state shown in FIG. 4works well in environments where the storage tier is implemented usingdedicated shared storage (e.g., a SAN or NAS-based storage array), itcan be problematic for environments where the storage tier isimplemented using distributed object-based storage (like HC/OB storage108 of FIG. 1). This is due to the varying and potentially asymmetricnature of object accessibility in such distributed storage systems—ifthe HA protection state is maintained in a centralized file in HC/OBstorage (which, in turn, would be persisted as one or more storageobjects across the HC/OB object store), there may be cases where amaster HA module cannot access the file, even if the master HA modulecan access the VMs themselves. For example, assume that the centralizedHA protection file is stored as two storage objects across hosts H3 andH5 of a host cluster comprising hosts H1, H2, H3, H4, and H5. If afailure causes H3 and H5 to be partitioned from H1, H2, and H4, a masterHA module in the [H1, H2, H4] partition will not be able to restart anyVMs because it will not have access to the HA protection file in the[H3, H5] partition. This would remain true even if all of the VMs in thecluster were maintained within, and thus accessible from, the [H1, H2,H4] partition. Further, after a network partition is resolved, mergingupdates to the HA protection file that are performed during thepartition can be complicated (or may not be possible at all).

To address the foregoing and other similar issues, in certainembodiments each master HA module can persist the HA protection statefor a VM within one or more storage objects of the VM on the HC/OBstorage tier, rather than in a centralized file. Stated another way,each master HA module can co-locate the HA protection state for a VMwith the persistent configuration of that specific VM. With thisapproach, if a host/master HA module can access the VM's configurationinformation on HC/OB storage, the host/master HA module can also accessthe VM's protection state information (and thus, the master HA modulecan make an attempt to failover/restart the VM as needed). This alsoensures that, when a VM is powered on, the master HA module in thecluster/partition where the VM is registered will always be able topersist the HA protection state for the VM.

There are a number of different ways in which HA protection state can beco-located with VM state in HC/OB storage (e.g., as a distinct file theVM's file system, as object metadata, etc.). According to a particularembodiment, each master HA module can store the HA protection state fora given VM as part of the metadata of the VM's namespace object in theHC/OB object store. This embodiment can be advantageous in certainscenarios. For example, recall that each VSAN module caches, in asynchronized in-memory database (i.e., database 212 of FIG. 2),information about the storage objects in the object store. As part ofthis process, in some embodiments, each VSAN module can automaticallycache the metadata for each VM namespace object (and potentially otherstorage objects) in the in-memory database. Thus, in these embodiments,when a newly elected master HA module needs to retrieve the HAprotection state for all VMs in a cluster/partition (e.g., following afailure or at other times), the newly elected HA module can query theVSAN layer, which in turn can quickly retrieve the HA protection statefrom the in-memory database (rather than from HC/OB storage). This cansignificantly speed up the protection state retrieval process, which isimportant since any lag between the time a master HA module is electedand the time at which it knows which VMs to protect can potentiallyresult in unhandled failures. If the HA protection state for each VMwere stored as a separate file within each VM's file system, the VSANlayer (or some other component) would need to discover all of the filelocations, enumerate the files, and then open/read/close each file,which can be a very time-consuming process.

FIG. 5 depicts a flowchart 500 that may be performed by a master HAmodule for persisting HA protection state for a VM to the VM's namespaceobject according to an embodiment. For instance, flowchart 500 may beperformed by a particular HA module 122(X) in host cluster 102 of FIG. 1that has been elected to carry out master duties.

At block 502, master HA module 122(X) can receive a list of one or moreVMs to be HA protected from, e.g., virtualization management platform106. This may occur when one or more VMs are powered on (as in flowchart400 of FIG. 4) or at other times. In one embodiment, the list of VMsidentifies the VMs as well as the host systems on which the VMs areregistered for execution.

At block 504, master HA module 122(X) can enter a loop for each VM.Within the loop, protection state management component 306 of master HAmodule 122(X) can first store HA protection state for the VM in memory.The HA protection state can be embodied in various ways, such as a“protected” flag or some other value.

Protection state management component 306 can then invoke, e.g., a “SET”API exposed by the VSAN layer for persisting the VM's HA protectionstate as metadata for the VM's namespace object in HC/OB object store116 (block 508). In a particular embodiment, this API can be a genericmetadata SET API that can be used to update any metadata field of thenamespace object. In this embodiment, the generic SET API can take asinput a key-value pair that identifies the metadata field to bepopulated and the corresponding value. The generic SET API can alsooptionally take as input a “service identifier” that identifies theservice component or layer that is performing the metadata update (inthis case, HA). In other embodiments, the SET API can be specificallytailored to set HA protection state within the namespace object.

Upon receiving the invocation of the SET API, the VSAN layer (inparticular, the VSAN module of the host system on which the master HAmodule is located, in concert with potentially other VSAN modules onother host systems) can cause the HA protection state for the VM to beadded to the VM's namespace object metadata in object store 116 (block510). As noted above, the HA protection state can be stored as, e.g., a“protected” flag or some similar indicator/value. The VSAN layer cansubsequently cache the HA protection state in in-memory database 212 andreturn a completion message to master HA module 122(X). In response,master HA module 122(X) can reach the end of the VM loop (block 514) anditerate though blocks 504-514 until all of the VMs have been processed.

It should be noted that, although flowchart 500 and certain othersubsequent flowcharts illustrate VMs as being processed serially in aloop, in alternative embodiments these steps can be carried out onmultiple VMs at the same time (e.g., via batching). Further, in caseswhere the host system on which master HA module 122(X) is running cannotaccess HC/OB storage 108, master HA module 122(X) can cause the SET APIdescribed above to be executed via a slave HA module. For example,master HA module 122(X) can send a message to the slave HA module toinvoke the API, or can directly invoke the API via a remote procedurecall. This embodiment is described in further detail in Section 4.2below.

FIG. 6 depicts a flowchart 600 that may be performed by a master HAmodule for accessing HA protection state that has been persisted perflowchart 500 of FIG. 5 according to an embodiment. For instance,flowchart 500 may be performed by a HA module 122(Y) in host cluster 102of FIG. 1 that has been elected as a new master in response to, e.g., afailure/partitioning/isolation of master HA module 122(X) that executedflowchart 500.

At block 602, protection state management component 306 of master HAmodule 122(Y) can invoke a VSAN GET API for retrieving the HA protectionstate for the VMs in host cluster 102 from object store 116. Like theSET API discussed with respect to block 508 of FIG. 5, this GET API canbe a generic API that can be used to retrieve the value(s) of anymetadata field of any namespace object (or group of namespace objects),or a non-generic API that is specifically designed for retrieving HAprotection state.

At block 604, the VSAN layer can receive the API invocation and canconsult in-memory database 212 to retrieve and return the requested HAprotection state to master HA module 122(Y). This step can comprise,e.g., accessing the cached namespace object metadata for each VM indatabase 212. As mentioned previously, since the VSAN layer does notneed to hit physical storage in order to perform this retrievaloperation, master HA module 122(Y) can more quickly determine which VMsit needs to protect when compared to other persistence techniques.

Finally, at block 606, protection state management component 306 ofmaster HA module 122(Y) can determine the currently-known set of HAprotected VMs based on the information returned by the VSAN layer atblock 604.

In certain embodiments, the API invocation at block 602 of flowchart 600will only return the HA protection state information that the VSAN layercan access from HC/OB storage 108 at that time. Due to failures, it ispossible some HA protection state information is not accessible. Toaccount for this situation, in one embodiment (not shown), master HAmodule 122(Y) can re-invoke the GET API after the VSAN layer informs themaster HA module of a change in accessibility of any storage objects.This re-invocation may cause the master HA module to determine thatadditional VMs are, in fact, HA protected.

It should be appreciated that the embodiments described above areillustrative and that other approaches are also possible forpersisting/managing HA protection state for VMs stored on HC/OB storage.For example, according to one alternative approach, the VSAN layeritself may be modified to support the storage of a file that can beconcurrently accessed by host systems in different network partitions.With this approach, HA protection state can remain within a centralizedfile as in current HA implementations, since all master HA modules wouldbe able to read it (regardless of how the cluster is partitioned). Oneimplementation of this approach may, for simplicity, allow only onemaster HA module to write to the centralized file at a time. This“write-enabled” master may be selected via, e.g., a third party witness.Another implementation may allow multiple concurrent writers, with thehost system of each master HA module owning a segment of the file forwrite purposes.

3. HA Failover/Restart Workflow

In addition to protection state management, another aspect of HA that isaffected by the use of a HC/OB storage system for VM data storage is theVM restart/failover workflow orchestrated by master HA modules in theevent of a failure. As discussed in Section 1.2 above, a conventionalversion of this workflow comprises (1) identifying the VMs to berestarted, (2) placing those VMs on active host systems that haveavailable capacity and which can access the VM's devices includingstorage, and (3) transmitting commands to the slave HA modules on therespective host systems to initiate the restart process for each VM.Unfortunately, this conventional version fails to take into account thefact that, when a VM is stored on HC/OB storage, the accessibility ofthe VM's objects cannot be determined via a storage-container check, andhence there may be cases where the VM cannot be restarted because one ormore of its storage objects are not yet accessible to the host systemexecuting on the master HA module (and/or to the host system on whichthe restart is being attempted). This, in turn, can result in multiplecontinuous VM restart attempts, which can increase the load on theaffected host systems and can delay the restart of other VMs.

To address this, FIGS. 7, 8, and 9 depict a modified HA failover/restartworkflow (comprising flowcharts 700, 800, and 900 respectively) that canbe performed by a master HA module (e.g., 122(X) of FIG. 1) according toan embodiment. At a high level, this modified workflow can check whethera given VM is accessible by the host system on which the master HAmodule is located before the master HA module attempts to restart it,thereby reducing the total number of unsuccessful VM restart attempts(and thus, the load on the system).

Starting with flowchart 700 of FIG. 7, at block 702, host/VM monitoringcomponent 300 of master HA module 122(X) can detect a failure withinhost cluster 102 that necessitates the failover of one or more VMs. Atblock 704, failover orchestration component 302 of master HA module122(X) can identify the VM(s) to be failed-over/restarted in response tothe failure. For example, in one embodiment, failover orchestrationcomponent 302 can identify these VMs based on the HA protection stateinformation discussed with respect to Section 2 above.

At block 706, failover orchestration component 302 can enter a loop foreach VM identified at block 704. Within the loop, failover orchestrationcomponent 302 can first determine whether the VM is a “VSAN VM” (i.e., aVM whose state is stored on HC/OB storage 108) (block 708). If not,failover orchestration component 302 can add the VM to a “restart list”of VMs to be immediately placed and restarted (block 710). As discussedwith respect to flowchart 800 of FIG. 8 below, another thread/process offailover orchestration component 302 can asynchronously process thisrestart list to place and restart the listed VMs. The VM loop can thenend (block 716), and failover orchestration component 302 can return toblock 706 to iterate through the loop again, if needed, to handleadditional VMs.

If failover orchestration component 302 determines that the VM is not aVSAN VM at block 708, component 302 can move on to checking whether theVM is accessible (block 712). For example, in one embodiment, block 712can comprise determining whether all of the VM's storage objects can beaccessed by the host system of master HA module 122(X) from HC/OBstorage 108. In a particular embodiment, this check can be carried outby invoking an appropriate query API exposed by the VSAN layer. If theVM is accessible, failover orchestration component 302 can add the VM tothe restart list as described above (block 710).

On the other hand, if the VM is inaccessible, failover orchestrationcomponent 302 can add the VM to a “wait list” of VMs waiting for anaccessibility change (block 714). As discussed with respect to flowchart900 of FIG. 9 below, another thread/process of failover orchestrationcomponent 302 can asynchronously process this wait list to wait for theaccessibility of the VMs on the list to change before restarts for thoseVMs are attempted. The VM loop can then end (block 716), and failoverorchestration component 302 can return to block 706 to iterate throughthe loop again, if needed, to handle additional VMs.

Turning now to FIG. 8, flowchart 800 depicts a sub-flow that can beperformed by an independent thread/process of failover orchestrationcomponent 302 of master HA module 122(X) for processing the restart listnoted at block 710 of FIG. 7 according to an embodiment. In theembodiment of FIG. 8, flowchart 800 is performed in the context of aparticular VM on the restart list (and thus should be repeated for allother VMs on the list).

At block 802, failover orchestration component 302 can first attempt tofind a place for restarting the current VM. In other words, failoverorchestration component 302 can attempt to find an active host systemwithin host cluster 102 that is suitable for hosting execution of theVM. In one embodiment, this placement step may take into account theavailable compute (e.g., CPU, memory, etc.) capacity of each active hostsystem, and/or other factors.

If failover orchestration component 302 cannot find a place for the VM(block 804), component 302 can wait for a host capacity change (block806) and can subsequently return to block 802.

If a place for the VM can be found at block 804, failover orchestrationcomponent 302 can initiate the VM restart process on the identified hostsystem (not shown). Failover orchestration component 302 can then checkwhether the restart was successful (block 808). If so, flowchart 800,and the overall restart workflow for this VM, can end.

If the restart was unsuccessful, failover orchestration component 302can check whether the restart failed due to insufficient capacity at theselected host system (block 809). If so, component 302 can wait for ahost capacity change as noted above (block 806) and can return to block802.

However, if the restart did not fail due to insufficient host capacity,failover orchestration component 302 can perform a series of steps todetermine whether the failed restart was caused by a VM/objectaccessibility issue. In particular, at block 810, failover orchestrationcomponent 302 can check whether the VM is a VSAN VM. If not, failoverorchestration component 302 can conclude that the failed restart was dueto some transient issue on the target host system, and thus can wait fora delay period before re-attempting the restart process (block 812).

On the other hand, if the VM is VSAN VM, failover orchestrationcomponent 302 can check whether the restart failed because the VM wasinaccessible, and whether the VM is still currently inaccessible. In oneembodiment, component 302 can perform this check by, e.g., invoking thesame query API used at block 708 of FIG. 7 (block 814). This secondaccessibility check is useful because, in certain embodiments, theaccessibility of the VM may change between the first check performed atblock 708 and the actual restart of the VM at block 808.

If the VM is accessible at block 814, failover orchestration component302 can wait for a delay period (block 812) and subsequently return toblock 802. Otherwise, failover orchestration component 302 can removethe VM from the restart list and add it to the wait list (blocks 816 and818). In this way, failover orchestration component 302 can put off anyfurther restart attempts for this VM until its stored objects areaccessible.

Turning now to FIG. 9, flowchart 900 depicts a sub-flow that can beperformed by an independent thread/process of failover orchestrationcomponent 302 of master HA module 122(X) for processing the wait listnoted at block 714 of FIG. 7 and block 818 of FIG. 8 according to anembodiment. In the embodiment of FIG. 9, flowchart 900 is performed inthe context of a particular VM on the wait list (and thus should berepeated for all other VMs on the list).

At block 902, failover orchestration component 302 can check whether theaccessibility of the current VM has changed. Such a change may occur dueto, e.g., a “resolution event” that causes the VM, and potentially otherVMs in the cluster, to become available again. In one set ofembodiments, failover orchestration component 302 can perform this checkby waiting for a notification from the VSAN layer that the VM'saccessibility has changed. In these embodiments, failover orchestrationcomponent 302 can register for the notification by, e.g., registeringfor a callback exposed by the VSAN layer.

It should be noted that, in some cases where a resolution event occurs,the VSAN layer may not become aware that the storage objects of all VMsaffected by the event have become accessible at exactly the same moment.Rather, it may take some time for the VSAN layer to determine theaccessibility of VM 1, the accessibility of VM 2, and so on.Accordingly, in certain embodiments, the VSAN layer may be configured toissue multiple “accessibility changed” notifications in response to aresolution event. For instance, each successive notification can reportthe VMs whose storage objects have become accessible since the lastnotification. The notifications can be issued on a fixed time interval(e.g., one every minute) or as objects/VMs become accessible. With thisapproach, the average time needed to restart VSAN VMs can be reduced.

If failover orchestration component 302 determines that the current VMis not yet accessible at block 902, component 302 can continue to waitfor an accessibility change (block 904) and return to block 902.

However, if the VM becomes accessible at block 902, failoverorchestration component 302 can remove the VM from the wait list and addit to the restart list (blocks 906 and 908). As a result, component 302can subsequently place and restart the VM (whose stored state is nowfully accessible) per the processing of flowchart 800 of FIG. 8.

It should be appreciated that the embodiments described above formodifying the conventional HA failover/restart workflow are illustrativeand numerous variations and alternatives are possible. For example, insome embodiments, as part of the “accessibility changed” notificationstep described at block 902 of FIG. 9, the VSAN layer may not be able tonotify master HA module 122(X) when a particular VM has becomeaccessible; rather, the VSAN layer may only be able to notify master HAmodule 122(X) when one or more storage objects of any VM in the clusterhave become accessible. To account for this, when failover orchestrationcomponent 302 of master HA module 122(X) receives the notification,component 302 can re-invoke the accessibility query API for each VM inthe wait list in order to identify the specific VM whose storageobject(s) have become accessible.

In addition, in some embodiments, the accessibility query API exposed bythe VSAN layer may not be able to return a definite answer as to whethera VM is accessible; instead, the API may only be able to indicatewhether a VM's namespace object is accessible. In these scenarios, thesame failover/restart workflow shown in FIGS. 7, 8, and 9 may be used,but master HA module 122(X) may need to attempt more VM restarts (sincethe restart for a given VM will fail if a full copy of the VM'spersistent data, such as its virtual disks, is not accessible).

4. Network Partition Scenarios

When a failure splits the host systems in a host cluster into two ormore network partitions, the HA and VSAN modules in the cluster may ormay not observe the same partitions. For example, if the HA and VSANmodules share the same management network, they will generally observethe same partitions (since a failure in the management network willsplit both groups of modules in the same manner). However, if the HA andVSAN modules do not share the same management network (as in environment100 of FIG. 1), there may be cases where a network failure splits onegroup of modules but not the other, or splits the two groups of modulesin non-identical ways. There are generally four partition scenarios toconsider:

1. The HA modules observe a partition but the VSAN modules do not

2. The VSAN modules observe a partition but the HA modules do not

3. The HA and VSAN modules observe identical partitions

4. The HA and VSAN modules observe non-identical partitions

Some of the scenarios above may require enhancements to the HAprotection state persistence and HA failover/restart techniquesdescribed in Sections 2 and 3 so that those techniques can operateefficiently. These enhancements are detailed in the sub-sections thatfollow.

4.1 Partition Scenario 1

In this scenario, the HA modules observe a partition but the VSANmodules do not. With respect to environment 100 of FIG. 1, this mayoccur if, e.g., there is a failure in management network 126interconnecting HA modules 122(1)-122(M), but there is no failure inmanagement network 124 interconnecting VSAN modules 120(1)-120(M).

If scenario 1 occurs, the group of HA modules in each partition willelect a master HA module, such that there are multiple master HA modules(one per partition). The master HA module in each partition will be ableto read and write the HA protection state for all VMs in the hostcluster, because the VSAN layer has full visibility of the entire HC/OBobject store. Accordingly, no changes are needed for the HA protectionstate persistence/retrieval flows described in Section 2 to accommodatethis scenario.

In terms of HA failover/restart, each master HA module will, inparallel, attempt to restart each VM within the master module'spartition. In certain embodiments, no mechanism may be provided toprevent concurrent VM restart attempts by different master HA modules indifferent partitions. Nevertheless, generally speaking, only oneinstance of each VM will actually power-on, because VM power-onrequires, in one embodiment, an exclusive lock to be held on one of theVM's files (and thus only one master HA module will obtain this lock andsuccessfully power-on the VM). This means that changes are also notneeded for the failover/restart workflow described in Section 3 toaccommodate this scenario.

4.2 Partition Scenario 2

In this scenario, the VSAN modules observe a partition but the HAmodules do not. One example of this scenario is illustrated in FIG. 10,which depicts a host cluster 1000 of six host systems 104(1)-104(6) inwhich there is a failure in management network 124 interconnecting VSANmodules 120(1)-120(6) (that splits the cluster into two partitions[104(1), 104(2), 104(3)] and [104(4), 104(5), 104(6)]), but there is nofailure in management network 126 interconnecting HA modules122(1)-122(6). Thus, master HA module 122(1) on host system 104(1)(identified by the “M” designation) is able to communicate with slave HAmodules 122(2)-122(6) on host systems 104(2)-104(6), while the VSANmodules can only communicate with the other VSAN modules in theirparticular partition.

Scenario 2 raises the following issues:

A. When a master HA module needs to update the metadata for a VMnamespace object (e.g., in order to persist/modify the VM's HAprotection state), the master HA module's host system may not be able toaccess the namespace object, while the host systems of one or more slaveHA modules can. This is because the VM namespace object will only beaccessible in the VSAN partition where there is a quorum of storageobjects for that VM. For instance, in FIG. 10, master HA module 122(1)on host system 104(1) cannot access the namespace object of VM 2 (sincethe majority of VM 2's objects are in the [104(4), 104(5), 104(6)]partition), while slave HA modules 122(4)-122(6) on host systems104(4)-104(6) can.

B. When a master HA module attempts to restart a VM, the master HAmodule may not know which specific host systems, if any, have access tothe VM for placement purposes. For instance, in FIG. 10, if host system104(2) (which is running VM 2) fails, master HA module 122(1) on hostsystem 104(1) does not know that VM 2 may only be placed/restarted onhost systems 104(4), 104(5), or 104(6), since only those host systemscan access VM 2's objects.

C. When the accessibility of a VM changes, this change may not bevisible to the host system on which the master HA module is running Forinstance, in FIG. 10, if host system 104(5) fails and then recovers,master HA module 122(1) on host system 104(1) should be made aware thatthe accessibility of VM 2 has changed. But, since VSAN module 120(5) ispartitioned from the VSAN module 120(1), master HA module 122(1) cannotbe notified.

D. When a master HA module is newly elected, some VMs may beinaccessible to the host system on which the master is running and thusthe master HA module may not know that they need to be restarted after afailure.

For issues A and B above, at least three solutions are possible: (1) themaster HA module queries each slave HA module to learn whether thatslave HA module can access a particular VM; (2) the VSAN module (or someother component) on each host system publishes the set of VMs that areaccessible from that host, and this set is forwarded to the master HAmodule by each slave HA module; and (3) the master HA module usestrial-and-error when attempting to update the metadata of a VM or whentrying to restart it.

For issue C above, the master HA module can inform the slave HA modulesof the VMs that the master is interested in tracking for accessibilitychange purposes. The slave HA modules can then report back to the masterwhen a given VM becomes accessible to the respective host systems of theslaves.

For issue D above, the master HA module can periodically ask each slaveHA module to call the GET API to retrieve the HA protection stateinformation for accessible VMs. The master HA module can subsequentlycompare the information received from the slave HA modules with what ithad previously obtained. Based on this comparison, if there are any newVMs that are not currently running, the master HA module can attempt torestart those VMs.

FIG. 11 depicts a flowchart 1100 that can be performed by, e.g., masterHA module 122(1) of FIG. 10 for solving issue A (metadata update) viasolution 1 above. In a particular embodiment, master HA module 122(1)can perform flowchart 1100 as part of block 508 of the HA protectionstate persistence flow shown in FIG. 5.

Starting with block 1102, protection state management component 306 ofmaster HA module 122(1) can attempt to invoke the VSAN SET API (on hostsystem 104(1)) for persisting the protection state of a VM (e.g., VM 2)in HC/OB object store 116. If this invocation completes successfully atblock 1104 (meaning that host system 104(1) has access to the VM'snamespace object), flowchart 1100 can end (block 1104).

On the other hand, if the invocation of the VSAN SET API does notcomplete successfully at block 1104, protection state managementcomponent 306 can identify a subset of slave HA modules 122(2)-122(6)and can issue a VM accessibility query to the subset in parallel (blocks1106 and 1108). This subset could be determined, for example, byquerying the VSAN layer for the hosts that the current host can accessover the management network 124, and then excluding these from thesubset queried in block 1106. This VM accessibility query caneffectively ask the target HA module whether the host system on which itis running has access to the VM.

If a particular slave HA module in the subset sends a response messageindicating that its host system can access the VM (block 1110),protection state management component 306 of master HA module 122(1) cantransmit a command to that slave HA module with instructions to invokethe VSAN SET API from its respective host system (block 1112). If thisremote invocation is successful (block 1114), flowchart 1100 can end.

However, if no slave HA module in the subset indicates that its hostsystem can access the VM at block 1110 (or if the remote invocation atblock 1112 is unsuccessful), protection state management component 306of master HA module 122(1) can check whether all of the slave HA moduleshave been queried. If not, component 306 can select a new subset atblock 1106 and repeat the subsequent steps of flowchart 1100.

Finally, if protection state component 306 determines that all slave HAmodules have been queried at block 1116, component 306 can add the VM tothe “wait for accessibility change list” described with respect to FIGS.7-9 (block 1118) and can subsequently return to block 1102.

FIG. 12 depicts a flowchart 1200 that can be performed by, e.g., masterHA module 122(1) of FIG. 10 for solving issue B (determining VMaccessibility for placement/restart) via solution 1 above. In aparticular embodiment, master HA module 122(1) can perform flowchart1200 as part of block 802 of the HA failover/restart sub-flow shown inFIG. 8.

At block 1202, failover orchestration component 302 of master HA module122(1) can transmit a list of VMs to be placed and restarted to slave HAmodules 122(2)-122(6) for the purpose of inquiring about theaccessibility of the VMs from their respective host systems.

At block 1204, failover orchestration component 302 can receive therequested accessibility information from the slave HA modules. Failoverorchestration component 302 can then match the VMs to certain hostsystems based on the received accessibility information (block 1206).

FIG. 13 depicts a flowchart 1300 that can be performed by, e.g., masterHA module 122(1) of FIG. 10 for solving issue C (accessibility changevisibility) above. In a particular embodiment, master HA module 122(1)can perform flowchart 1300 prior to block 902 of the HA failover/restartsub-flow shown in FIGS. 9.

At block 1302, failover orchestration component 302 of master HA module122(1) can notify slave HA modules 122(2)-122(6) of the “wait list” ofVMs on which master HA module 122(1) is waiting for an accessibilitychange notification.

In response, each slave HA module can query (via the accessibility queryAPI discussed with respect to FIGS. 7 and 8) its respective VSAN modulefor accessibility of the VMs on the list (block 1304).

Finally, at block 1306, each slave HA module can report back to masterHA module 122(1) when a VM on the list has become accessible (or isalready accessible).

It should be appreciated that FIGS. 11-13 are illustrative and variousmodifications/alternatives are possible. For example, in FIG. 11, themaster HA module may not need to attempt to execute the VSAN SET API onthe host of each slave HA module. Rather, when an attempt fails on ahost X, the VSAN module of host X can return the IDs of the hosts thatthe VSAN module can communicate with over VSAN network 124. The masterHA module can then use this information to make only one attempt perpartition rather than one attempt per host.

4.3 Partition Scenario 3

In this scenario, the HA and VSAN modules observe identical partitions.With respect to environment 100 of FIG. 1, this may occur if, e.g.,there are failures at identical points in management networks 126 and124 respectively. Alternatively, this scenario may occur if the HA andVSAN modules share the same management network and there is a failure onthat shared network.

Scenario 3 is similar to scenario 1 in that the group of HA modules ineach partition will elect a master HA module, such that there aremultiple master HA modules (one per partition). The master HA modules ineach partition will only be able to read and write the HA protectionstate for the VMs that are accessible from within the master'spartition; however, each VM should be accessible to one master HAmodule. Accordingly, no changes are needed for the HA protection statepersistence/retrieval flows described in Section 2 to accommodate thisscenario.

In terms of HA failover/restart, each master HA module will attempt torestart its accessible VMs within its partition. To accomplish this, themaster HA modules can follow the failover/restart workflow described inSection 3, without any specific changes or enhancements.

4.4 Partition Scenario 4

In this scenario, the HA and VSAN modules observe non-identicalpartitions. An example of this scenario is illustrated in FIG. 14, whichdepicts a host cluster 1400 of six host systems 104(1)-104(6) in whichthere is a first failure in management network 124 interconnecting VSANmodules 120(1)-120(6) that splits the cluster into two partitions[104(1), 104(2), 104(3)] and [104(4), 104(5), 104(6)], and there is asecond failure in management network 126 interconnecting HA modules122(1)-122(6) that splits the cluster into two different partitions[104(1), 104(2), 104(3), 104(4)] and [104(5), 104(6)].

If scenario 4 occurs, a master HA module that knows whether a given VMis protected may not know whether the VM is accessible within themaster's partition. Conversely, a master HA module that knows whether aVM is accessible within its partition may not know whether the VM isprotected. To process HA protection state updates and restart failed VMsquickly in this scenario, the master HA module that is responding to theprotection request or knows a VM is protected should retry suchoperations repeatedly until they succeed.

The embodiments described herein can employ various computer-implementedoperations involving data stored in computer systems. For example, theseoperations can require physical manipulation of physicalquantities—usually, though not necessarily, these quantities take theform of electrical or magnetic signals, where they (or representationsof them) are capable of being stored, transferred, combined, compared,or otherwise manipulated. Such manipulations are often referred to interms such as producing, identifying, determining, comparing, etc. Anyoperations described herein that form part of one or more embodimentscan be useful machine operations.

Further, one or more embodiments can relate to a device or an apparatusfor performing the foregoing operations. The apparatus can be speciallyconstructed for specific required purposes, or it can be a generalpurpose computer system selectively activated or configured by programcode stored in the computer system. In particular, various generalpurpose machines may be used with computer programs written inaccordance with the teachings herein, or it may be more convenient toconstruct a more specialized apparatus to perform the requiredoperations. The various embodiments described herein can be practicedwith other computer system configurations including handheld devices,microprocessor systems, microprocessor-based or programmable consumerelectronics, minicomputers, mainframe computers, and the like.

Yet further, one or more embodiments can be implemented as one or morecomputer programs or as one or more computer program modules embodied inone or more non-transitory computer readable storage media. The termnon-transitory computer readable storage medium refers to any datastorage device that can store data which can thereafter be input to acomputer system. The non-transitory computer readable media may be basedon any existing or subsequently developed technology for embodyingcomputer programs in a manner that enables them to be read by a computersystem. Examples of non-transitory computer readable media include ahard drive, network attached storage (NAS), read-only memory,random-access memory (e.g., a flash memory device), a CD (Compact Disc)(e.g., CD-ROM, CD-R, CD-RW, etc.), a DVD (Digital Versatile Disc), amagnetic tape, and other optical and non-optical data storage devices.The non-transitory computer readable media can also be distributed overa network coupled computer system so that the computer readable code isstored and executed in a distributed fashion.

In addition, while described virtualization methods have generallyassumed that virtual machines present interfaces consistent with aparticular hardware system, persons of ordinary skill in the art willrecognize that the methods described can be used in conjunction withvirtualizations that do not correspond directly to any particularhardware system. Virtualization systems in accordance with the variousembodiments, implemented as hosted embodiments, non-hosted embodimentsor as embodiments that tend to blur distinctions between the two, areall envisioned. Furthermore, certain virtualization operations can bewholly or partially implemented in hardware.

Many variations, modifications, additions, and improvements arepossible, regardless the degree of virtualization. The virtualizationsoftware can therefore include components of a host, console, or guestoperating system that performs virtualization functions. Pluralinstances can be provided for components, operations, or structuresdescribed herein as a single instance. Finally, boundaries betweenvarious components, operations, and data stores are somewhat arbitrary,and particular operations are illustrated in the context of specificillustrative configurations. Other allocations of functionality areenvisioned and may fall within the scope of the invention(s). Ingeneral, structures and functionality presented as separate componentsin exemplary configurations can be implemented as a combined structureor component. Similarly, structures and functionality presented as asingle component can be implemented as separate components.

As used in the description herein and throughout the claims that follow,“a,” “an,” and “the” includes plural references unless the contextclearly dictates otherwise. Also, as used in the description herein andthroughout the claims that follow, the meaning of “in” includes “in” and“on” unless the context clearly dictates otherwise.

The above description illustrates various embodiments along withexamples of how aspects of particular embodiments may be implemented.These examples and embodiments should not be deemed to be the onlyembodiments, and are presented to illustrate the flexibility andadvantages of particular embodiments as defined by the following claims.Other arrangements, embodiments, implementations and equivalents can beemployed without departing from the scope hereof as defined by theclaims.

What is claimed is:
 1. A method for persisting high availability (HA)protection state for virtual machines (VMs) running on host systems of ahost cluster, wherein the host cluster aggregates locally-attachedstorage resources of the host systems to provide an object store, andwherein persistent data for the VMs is stored as per-VM storage objectsacross the locally-attached storage resources comprising the objectstore, the method comprising: determining, by a first host system in thehost cluster executing a first HA module, an identity of a VM that hasbeen powered-on in the host cluster; and persisting, by the first hostsystem, HA protection state for the VM in a storage object of the VM,the HA protection state indicating that the VM should be restarted on anactive host system in case of a failure in the host cluster.
 2. Themethod of claim 1 wherein the storage object is a namespace object thatincludes a representation of a file system configured to store the VM'sfiles.
 3. The method of claim 1 wherein the HA protection state ispersisted as metadata of the storage object.
 4. The method of claim 3wherein the persisting comprises: invoking a first storage applicationprogramming interface (API) exposed by a storage layer of the hostcluster, the storage layer being configured to manage the object store.5. The method of claim 4 wherein the metadata of the storage object iscached, by the storage layer, in an in-memory database that is availableto each host system.
 6. The method of claim 5 further comprising:invoking, by a second host system in the host cluster executing a secondHA module, a second storage API exposed by the storage layer, the secondstorage API being configured to retrieve HA protection states for allaccessible VMs in the host cluster; and receiving, by the second hostsystem in response to the invoking of the second storage API, the HAprotection states from the storage layer, wherein the storage layerprocesses the second storage API by consulting the in-memory database.7. The method of claim 6 wherein the first and second HA modules aremaster HA modules, and wherein the second HA module is elected inresponse to a failure that causes the first host system to becomeinoperable or unreachable by the second host system.
 8. A non-transitorycomputer readable storage medium having stored thereon computer softwareexecutable by a processor of a host system, the computer softwareembodying a method for persisting high availability (HA) protectionstate for virtual machines (VMs) running on the host system and otherhost systems of a host cluster, wherein the host cluster aggregateslocally-attached storage resources of the host systems to provide anobject store, and wherein persistent data for the VMs is stored asper-VM storage objects across the locally-attached storage resourcescomprising the object store, the method comprising: determining, via aHA module executing on the host system, an identity of a VM that hasbeen powered-on in the host cluster; and persisting, HA protection statefor the VM in a storage object of the VM, the HA protection stateindicating that the VM should be restarted on an active host system incase of a failure in the host cluster.
 9. The non-transitory computerreadable storage medium of claim 8 wherein the storage object is anamespace object that includes a representation of a file systemconfigured to store the VM's files.
 10. The non-transitory computerreadable storage medium of claim 8 wherein the HA protection state ispersisted as metadata of the storage object.
 11. The non-transitorycomputer readable storage medium of claim 10 wherein the persistingcomprises: invoking a first storage application programming interface(API) exposed by a storage layer of the host cluster, the storage layerbeing configured to manage the object store.
 12. The non-transitorycomputer readable storage medium of claim 11 wherein the metadata of thestorage object is cached, by the storage layer, in an in-memory databasethat is available to each host system.
 13. The non-transitory computerreadable storage medium of claim 12 wherein another host systemexecuting another HA module is configured to invoke a second storage APIexposed by the storage layer, the second storage API being configured toretrieve HA protection states for all accessible VMs in the hostcluster, and wherein said another host system is configured to receive,in response to the invoking of the second storage API, the HA protectionstates from the storage layer, the storage layer processing the secondstorage API by consulting the in-memory database.
 14. The non-transitorycomputer readable storage medium of claim 13 wherein said HA module andsaid another HA module are master HA modules, and wherein said anothermaster HA module is elected in response to a failure that causes thehost system to become inoperable or unreachable by said another hostsystem.
 15. A host system comprising: a processor; and a non-transitorycomputer readable medium having stored thereon instructions that, whenexecuted by the processor, causes the processor to perform a method forpersisting high availability (HA) protection state for virtual machines(VMs) running on the host system and other host systems of a hostcluster, wherein the host cluster aggregates locally-attached storageresources of the host systems to provide an object store, and whereinpersistent data for the VMs is stored as per-VM storage objects acrossthe locally-attached storage resources comprising the object store, themethod comprising: determining, via a HA module of the host system, anidentity of a VM that has been powered-on in the host cluster; andpersisting, HA protection state for the VM in a storage object of theVM, the HA protection state indicating that the VM should be restartedon an active host system in case of a failure in the host cluster. 16.The host system of claim 15 wherein the storage object is a namespaceobject that includes a representation of a file system configured tostore the VM's files.
 17. The host system of claim 15 wherein the HAprotection state is persisted as metadata of the storage object.
 18. Thehost system of claim 17 wherein the persisting comprises: invoking afirst storage application programming interface (API) exposed by astorage layer of the host cluster, the storage layer being configured tomanage the object store.
 19. The host system of claim 18 wherein themetadata of the storage object is cached, by the storage layer, in anin-memory database that is available to each host system.
 20. The hostsystem of claim 19 wherein another host system executing another HAmodule is configured to invoke a second storage API exposed by thestorage layer, the second storage API being configured to retrieve HAprotection states for all accessible VMs in the host cluster, andwherein said another host system is configured to receive, in responseto the invoking of the second storage API, the HA protection states fromthe storage layer, the storage layer processing the second storage APIby consulting the in-memory database.
 21. The host system of claim 20wherein said HA module and said another HA module are master HA modules,and wherein said another master HA module is elected in response to afailure that causes the host system to become inoperable or unreachableby said another host system.